/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 */
package com.jeesite.modules.vehicle.service;

import com.jeesite.common.lang.StringUtils;
import com.jeesite.common.service.CrudService;
import com.jeesite.modules.general.utils.CosApiUtils;
import com.jeesite.modules.vehicle.dao.CarTypeApiDao;
import com.jeesite.modules.vehicle.entity.CarTypeApi;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 测试数据Service
 *
 * @author ThinkGem
 * @version 2018-04-22
 */
@Service
public class CarTypeApiService extends CrudService<CarTypeApiDao, CarTypeApi> {

    public List<CarTypeApi> findList(CarTypeApi carType) {
        List<CarTypeApi> list = dao.findList(carType);
        for (CarTypeApi type : list) {
            if (StringUtils.isNotEmpty(type.getImgUrl())) {
                type.setImgUrl(CosApiUtils.URL +type.getImgUrl());
            }
        }
        return list;
    }

}